#!/usr/bin/env python3
# coding=UTF-8
# Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

__all__ = [
    "placement_group",
    "remove_placement_group",
    "get_node_ip_address",
    "list_named_actors"
    "placement_group_table"
    "get_current_placement_group"
    "state"
]

import importlib
from ray_adapter.util.placement_group import (placement_group, remove_placement_group, placement_group_table,
                                              get_current_placement_group)
from ray_adapter.util.scheduling_strategies import PlacementGroupSchedulingStrategy, NodeAffinitySchedulingStrategy
from ray_adapter._private.services import get_node_ip_address, list_named_actors


def __getattr__(name):
    if name == "state":
        module = importlib.import_module("ray_adapter.util.state")
        globals()[name] = module
        return module
    raise AttributeError(f"module 'ray_adapter.util' has no attributes '{name}'")

